Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: ARSN-235 update object before deleting it #1944

Merged

Conversation

Kerkesni
Copy link
Contributor

@Kerkesni Kerkesni commented Jun 30, 2022

Issue: ARSN-235

Note: The full changes are in the integration PR

Due to Armory work, any changes affecting the MongoClientInterface needs to be pushed both in 7.x and 8.x.
Some tests are incompatible with 7.x due to the ObjectMD model being different. These tests were skipped in 7.x.

Two new properties were added to the ObjectMD (deleted, isPHD). The commits are only applied to the 8.x branch for obvious reasons.

Bucket Notification as well as Cold Storage need object metadata when this one gets deleted. The MongoDB oplog's delete events do not contain any of the metadata of the deleted object. They only contain the "_id" of the object.

This issue was addressed by updating the metadata of the object while adding a new tag that shows that the object is being deleted, and then immediately deleting the object. This will add an update event to the oplog containing all of the needed metadata.

Cloudserver Build : https://eve.devsca.com/github/scality/cloudserver/#/builders/15/builds/9413

@bert-e
Copy link
Contributor

bert-e commented Jun 30, 2022

Hello kerkesni,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@Kerkesni Kerkesni changed the base branch from development/7.10 to development/8.1 June 30, 2022 15:33
@Kerkesni Kerkesni force-pushed the feature/ARSN-235-update-object-before-deleting-it branch 3 times, most recently from a958ad3 to e96f814 Compare September 9, 2022 12:29
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2022

Codecov Report

Merging #1944 (5b2d50b) into development/8.1 (4e8a907) will increase coverage by 0.05%.
The diff coverage is 86.48%.

@@                 Coverage Diff                 @@
##           development/8.1    #1944      +/-   ##
===================================================
+ Coverage            63.83%   63.89%   +0.05%     
===================================================
  Files                  206      206              
  Lines                15593    15641      +48     
  Branches              3179     3186       +7     
===================================================
+ Hits                  9954     9994      +40     
- Misses                5623     5631       +8     
  Partials                16       16              
Impacted Files Coverage Δ
...orage/metadata/mongoclient/MongoClientInterface.js 67.65% <83.87%> (+0.21%) ⬆️
lib/constants.ts 100.00% <100.00%> (ø)
lib/models/ObjectMD.ts 89.47% <100.00%> (+0.78%) ⬆️
lib/storage/metadata/mongoclient/readStream.js 68.29% <100.00%> (+0.39%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Kerkesni Kerkesni force-pushed the feature/ARSN-235-update-object-before-deleting-it branch 3 times, most recently from 5b2d50b to a4ec247 Compare September 12, 2022 14:23
@Kerkesni Kerkesni changed the base branch from development/8.1 to development/7.10 September 12, 2022 15:18
@Kerkesni Kerkesni force-pushed the feature/ARSN-235-update-object-before-deleting-it branch from a4ec247 to a5128af Compare September 12, 2022 15:19
@Kerkesni Kerkesni marked this pull request as ready for review September 12, 2022 15:21
@Kerkesni
Copy link
Contributor Author

/create_pull_requests

@scality scality deleted a comment from bert-e Oct 6, 2022
@scality scality deleted a comment from bert-e Oct 6, 2022
@Kerkesni Kerkesni force-pushed the feature/ARSN-235-update-object-before-deleting-it branch from abc9f56 to 7e25c9b Compare November 10, 2022 17:02
@scality scality deleted a comment from bert-e Nov 10, 2022
@scality scality deleted a comment from bert-e Nov 10, 2022
@scality scality deleted a comment from bert-e Nov 10, 2022
@Kerkesni
Copy link
Contributor Author

/force_reset

@bert-e
Copy link
Contributor

bert-e commented Nov 10, 2022

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_pull_requests

@bert-e
Copy link
Contributor

bert-e commented Nov 10, 2022

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/6.4
  • development/7.4

Follow integration pull requests if you would like to be notified of
build statuses by email.

The following options are set: create_pull_requests

@bert-e
Copy link
Contributor

bert-e commented Nov 10, 2022

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_pull_requests

Object deletion no longer directly deletes the object, it first
updates its metadata by setting the deletion flag and originOp then
proceeds to deleting the object.

This is done to keep a trace of the latest object metadata before deletion
in the oplog, as oplog delete events don't hold that information. This
information is needed for both Cold Storage and Bucket Notification

We also add all the object metadata to the placeholder (PHD) master
which wasn't previously the case, again this is done to keep the metadata
in the oplog as a PHD might get directly deleted in the repair phase.
@Kerkesni Kerkesni force-pushed the feature/ARSN-235-update-object-before-deleting-it branch from 7e25c9b to 9a97572 Compare November 13, 2022 21:04
@Kerkesni
Copy link
Contributor Author

/force_reset

@bert-e
Copy link
Contributor

bert-e commented Nov 13, 2022

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_pull_requests

@bert-e
Copy link
Contributor

bert-e commented Nov 13, 2022

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/6.4
  • development/7.4

Follow integration pull requests if you would like to be notified of
build statuses by email.

The following options are set: create_pull_requests

@bert-e
Copy link
Contributor

bert-e commented Nov 13, 2022

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_pull_requests

@scality scality deleted a comment from bert-e Nov 13, 2022
@Kerkesni
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Nov 14, 2022

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/7.10

  • ✔️ development/8.1

The following branches will NOT be impacted:

  • development/6.4
  • development/7.4

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: create_pull_requests, approve

@bert-e
Copy link
Contributor

bert-e commented Nov 14, 2022

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/7.10

  • ✔️ development/8.1

The following branches have NOT changed:

  • development/6.4
  • development/7.4

Please check the status of the associated issue ARSN-235.

Goodbye kerkesni.

@bert-e bert-e merged commit 7c1bd45 into development/7.10 Nov 14, 2022
@bert-e bert-e deleted the feature/ARSN-235-update-object-before-deleting-it branch November 14, 2022 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants